// import Vue from 'vue'
// import Vuex from 'vuex'
import Axios from "axios"
export default {
    namespaced: true,
    state: {
        count: 10,
        test02: {
            tell: '12312345678'
        }
    },
    mutations: {
        increment(state) {
            state.count++
        }
    },
    actions: {
        increment(context) {
            context.commit('increment')
        },
        async saveTask(context,data) {
            console.log(data)
            let url = "http://www.baidu.com"
            return Axios({
                method: 'post',
                url: url,
                data: {}
            }).then(res => {
                console.log(res)
                return res
            }).catch(error => {
                console.log(err)
            })
        }
    },
    getters: {
        count(state) {
            return state.count
        }
    }
}